using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace SunshineFarmWord
{
    public class GameObjHighLight : MonoBehaviour
    {
        [Header("高亮对象")]
        [field: SerializeField, Tooltip("高亮对象")]
        private List<SpriteRenderer> spriteRendererList;

        public void OpenHighLight()
        {
            if (spriteRendererList == null || spriteRendererList.Count == 0) return;
            foreach (SpriteRenderer item in spriteRendererList)
            {
                //将原有的颜色上升一倍
                //item.color = new Color(item.color.r / 1.5f, item.color.g / 1.5f, item.color.b / 1.5f, item.color.a);
            }
        }

        public void CloseHighLight()
        {
            if (spriteRendererList == null || spriteRendererList.Count == 0) return;
            foreach (SpriteRenderer item in spriteRendererList)
            {
                //将原有的颜色下降一倍
                //item.color = new Color(item.color.r * 1.5f, item.color.g * 1.5f, item.color.b * 1.5f, item.color.a);
            }
        }
    }
}
